/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.agtranscontinental.sisref.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author ericson
 */
@Entity
@Table(name = "configuraciones")
@NamedQueries({
    @NamedQuery(name = "Configuracion.findAll", query = "SELECT c FROM Configuracion c"),
    @NamedQuery(name = "Configuracion.byTpoAndVlor", query = "SELECT c FROM Configuracion c WHERE c.tpo=:tpo and c.vlor=:vlor"),
    @NamedQuery(name = "Configuracion.byTpo", query = "SELECT c FROM Configuracion c WHERE c.tpo=:tpo")
})
public class Configuraciones implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Integer id;
    @Size(max = 60)
    @Column(name = "tpo")
    private String tpo;
    @Size(max = 100)
    @Column(name = "vlor")
    private String vlor;
    @Size(max = 5)
    @Column(name = "cdgo")
    private String cdgo;
    @Column(name = "oden")
    private Integer oden;
    @Column(name = "dccion")
    private String dccion;
    
    public Configuraciones() {
    }

    public Configuraciones(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTpo() {
        return tpo;
    }

    public void setTpo(String tpo) {
        this.tpo = tpo;
    }

    public String getVlor() {
        return vlor;
    }

    public void setVlor(String vlor) {
        this.vlor = vlor;
    }

    public String getCdgo() {
        return cdgo;
    }

    public void setCdgo(String cdgo) {
        this.cdgo = cdgo;
    }

    public Integer getOden() {
        return oden;
    }

    public void setOden(Integer oden) {
        this.oden = oden;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Configuraciones)) {
            return false;
        }
        Configuraciones other = (Configuraciones) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.agtranconstinental.sisref.Configuracion[ id=" + id + " ]";
    }

    /**
     * @return the dccion
     */
    public String getDccion() {
        return dccion;
    }

    /**
     * @param dccion the dccion to set
     */
    public void setDccion(String dccion) {
        this.dccion = dccion;
    }

}
